#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;
using ll = long long;
const int N = 10010, M = 26;
ll f[N], w[M];
int v, n;
int main()
{
    cin >> v >> n;
    for (int i = 1; i <= v; i++) cin >> w[i];
    f[0] = 1;
    for (int i = 1; i <= v; i++)
    {
        for (int j = w[i]; j <= n; j++)
        {
            f[j] += f[j - w[i]];
        }
    }
    cout << f[n] << endl;
    return 0;
}